#ifndef __GP_LENSDEF_H__
#define __GP_LENSDEF_H__

#include "gplib_aeawb.h"

/*Capture RAW mode*/
#define RAW_MODE			0
#define MODE_PURERAW		0x50000			/*disable hybrid function and lens compensation, go path1*/
#define MODE_LINCORR		0x50001			/*enable lineraty, disable hybrid denoise and lens compensation, go path1*/
#define MODE_LENSCMP		0x50002			/*enable lens compensation, go path1*/
#define MODE_WBGAIN			0x50003			/*enable wb, gp path2*/
#define MODE_LUTGAMMA		0x50004			/*enable gamma, go path3*/


typedef struct gpUserFav_s
{
	unsigned char	ae_target;			/* target luminace */

	unsigned short	iso;

	unsigned char	ae_meter;
	unsigned char	awb_mode;
	unsigned char	color_mode;

	signed char		ev;

	signed char		day_hue_u_offset;	/* -128 ~ +127,   +: more blue,  -: more yellow/green	*/
	signed char		day_hue_v_offset;	/* -128 ~ +127,   +: more red,  -: more blue/green */

	unsigned char	day_sat_u_scale;
	unsigned char	day_sat_v_scale;

	unsigned char	day_edge;			/*	0:soft, 1:smooth, 2:normal, 3:strong */

	signed char		night_hue_u_offset; /* -128 ~ +127,   +: more blue,  -: more yellow/green	*/
	signed char		night_hue_v_offset; /* -128 ~ +127,   +: more red,  -: more blue/green */

	unsigned char	night_sat_u_scale;
	unsigned char	night_sat_v_scale;

	unsigned char	night_edge;			/*	0:soft, 1:smooth, 2:normal, 3:strong */

	unsigned char   max_lum; // 0 ~ 128
	unsigned char   max_lum2; // 0 ~ 128

	unsigned char   wb_factor; // normal: 64,  warm: > 64,  cold: < 64

	unsigned char   isp_function_en; //ISP Function Enable:  bit[0]:LSC , bit[1]:WB , bit[2]:GAMMA ,  bit[3]:CCM .
	                                 
	unsigned int    capture_raw_mode;  	//MODE_PURERAW (disable all go path1)    
	                					//MODE_LENSCMP (enable lens compensation go path1)
	    								//MODE_WBGAIN  (enable wb go path2)        
	    								//MODE_LUTGAMMA(enable wb & gamma go path3) 
	unsigned char   *UserAeTable;
	
} gpUserFav_t;

typedef struct gpCsiCali_s
{
	unsigned short	*ob;
	unsigned short	*radius0;
	unsigned short	*radius1;
	unsigned short	*clpoint;
	unsigned short	*maxtan;
	unsigned short	*slope;

	unsigned short	segR;
	unsigned int	*gamma;
	unsigned int	*gamma2;
	signed short	*awb_thr;
	//unsigned short (*wb_gain)[2];
	signed short	*color_matrix;
	signed short	*awb_new_thr;
	unsigned short  awb_new_thr_cnt;

	float			*AE_Weight;

	/*YUV Spec mode constrat*/
	unsigned int	*y_lut;
	unsigned int	*y_lut2;

	unsigned short  (*NRthr)[7];
	unsigned short  (*DPCthr)[4];
	
} gpCisCali_t;
#endif
